import {findList} from 'services/message'
import modelExtend from "dva-model-extend"
import {pageModel} from 'utils/model'

export default modelExtend(pageModel, {
  namespace: 'discover',

  state: {
    discoveriesVisible: false,
    author: {
      name: '匿名',
      avatar: '/public/logo@300.png',
      signature: '暂未获取到个性签名',
      background: '/public/default-cover.jpg',
    },
    recommendItem: {}
  },

  effects: {
    * query ({payload}, {call, put}) {
    },
  },

  reducers: {
    updateState (state, {payload}) {
      return {...state, ...payload}
    },

    showDiscoveries (state, {payload}) {
      return {...state, ...payload, discoveriesVisible: true}
    },

    hideDiscoveries (state) {
      return {...state, discoveriesVisible: false}
    },
  },
})
